<?
	//'http://www.diaoconline.vn/tin-tuc/tin-dia-oc/1/'
	function getHTMLNewLandDiaOcOnline()
	{
		$arrNew = null;
		$arrIMG = null;
		$index = 0;
		$link_new = 'http://www.diaoconline.vn/tin-tuc/tin-dia-oc/1/';
		// Create DOM from URL or file
		$html = file_get_html($link_new);
		
		
		// Find Article New
		foreach($html->find('div[class="NewsTopDetail"]') as $element)
		{
			$eA = $element->find('a');
			// Link
			//echo 'Link'. '<br>';
			$link = $eA[0]->href;
			$arrNew['link'] = $link;
			//echo $link . '<br>';
			
			// Find Image & Detail
			$html2 = file_get_html($link);
			
			foreach($html2->find('div[class="contentDetail"] div[class="TinDetail"] div[class="chitiet"]') as $element2)
			{
				// Detail
				//echo 'Detail'. '<br>';
				$detail = $element2;
				$arrNew['detail'] = $detail->innertext;
				//echo $detail . '<br>';
				
				foreach($detail->find('img') as $element3)
				{
					$img = $element3->src;
					$arrIMG[$index] = $img;
					$index++;
					//echo $img . '<br>';
						
				}
			}
			foreach($html2->find('div[class="contentDetail"] div[class="TinDetail"] div[class="dateA"]') as $element4)
			{
				$arrNew['date'] = $element4->innertext;
			}
				
			foreach($element->find('p') as $eP)
			{
				// Short
				//echo 'Mô tả ngắn'. '<br>';
				$short = $eP->plaintext;
				$arrNew['short'] = $short;
				//echo $short . '<br>';
			}
				
			foreach($element->find('H3') as $eH3)
			{
				// Title
				//echo 'Title'. '<br>';
				$title = $eH3->plaintext;
				$arrNew['title'] = $title;
				//echo $title . '<br>';	
			}	
			//echo '<br>';
		}	
		print_r($arrNew);
		print_r($arrIMG);
	}
?>